package org.example.aicloud.util;

import cn.hutool.crypto.SecureUtil;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Component;

@Component
public class NameUtil {

    /**
     * 获取验证码的文件名
     * @param request
     * @return
     */
    public  static String getCaptchaName(HttpServletRequest request) {
        return "captcha-" + SecureUtil.md5(request.getRemoteAddr());
    }
}
